package optimizers.ganeatgeneric;

import java.io.Serializable;

public class Connection implements Cloneable, Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	public int innovation;
	public Node from;
	public Node to;
	public boolean enabled;
	public double parameter;

	public Connection(int innovation, Node from, Node to, boolean enabled,
			double parameter) {
		this.innovation = innovation;
		this.from = from;
		this.to = to;
		this.enabled = enabled;
		this.parameter = parameter;
	}

	@Override
	protected Connection clone() throws CloneNotSupportedException {
		return new Connection(this.innovation, this.from, this.to,
				this.enabled, this.parameter);
	}

	@Override
	public String toString() {
		return from.toString() + "->" + to.toString();
	}
}
